<template>
    <div>
      
      <ul class="mui-table-view">
				<li class="mui-table-view-cell mui-media">
					<router-link :to="'/login/newlist/' + this.id">
						<img class="mui-media-object mui-pull-left" src="../../images/8.jpg">
						<div class="mui-media-body">
							幸福
							<p class='mui-ellipsis'>
                                <span>2021-4-14</span>
                                <span>下载次数</span>
                            </p>
                            
						</div>
					</router-link>
				</li>
                 <!-- 如果获取数据成功 下面进行渲染 -->
				<!-- <li class="mui-table-view-cell mui-media" v-for="item in bewlist" :key="item.id">
                 
					<a href="javascript:;">
						<img class="mui-media-object mui-pull-left" :src="item.url">
						<div class="mui-media-body">
							{{item.content}}
								<p class='mui-ellipsis'>
                                <span>{{item.time | dataFormate}}</span>
                                <span>{{item.download}}</span>
                            </p>
						</div>
					</a>
				</li> -->


			</ul>


    </div>
</template>
<script>
import {Toast} from 'mint-ui'
export default {
    data() {
        return {
            newlist: [],
            id: 13
        }
    },

    methods: {
        show() {
            this.$http.get('api/getnewslist').then(function(res) {
               if (res.body.status == 0) {
                    console.log(res.body);
                    this.newlist = res.body.message
               } else {
                   Toast('获取失败')
               }
            },function() {
                console.log('失败');
            })
        }
    },
    created() {
        this.show()
    }
    
}
</script>
<style lang="scss" scoped>
    .mui-ellipsis {
        display: flex;
        justify-content: space-between;
    }
</style>